package com.xzk.ExpressInnWeb.bean;

import java.sql.Timestamp;
import java.util.Objects;

public class Courier {

    private int id;
    private String couriername;
    private String staffphone;
    private String personalid;
    private String password;
    private int delivery;
    private Timestamp createtime;
    private Timestamp logintime;

    public Courier() {
    }

    public Courier(String couriername, String staffphone, String personalid, String password) {
        this.couriername = couriername;
        this.staffphone = staffphone;
        this.personalid = personalid;
        this.password = password;
    }

    public Courier(int id, String couriername, String staffphone, String personalid, String password, int delivery, Timestamp createtime, Timestamp logintime) {
        this.id = id;
        this.couriername = couriername;
        this.staffphone = staffphone;
        this.personalid = personalid;
        this.password = password;
        this.delivery = delivery;
        this.createtime = createtime;
        this.logintime = logintime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCouriername() {
        return couriername;
    }

    public void setCouriername(String couriername) {
        this.couriername = couriername;
    }

    public String getStaffphone() {
        return staffphone;
    }

    public void setStaffphone(String staffphone) {
        this.staffphone = staffphone;
    }

    public String getPersonalid() {
        return personalid;
    }

    public void setPersonalid(String personalid) {
        this.personalid = personalid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getDelivery() {
        return delivery;
    }

    public void setDelivery(int delivery) {
        this.delivery = delivery;
    }

    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    public Timestamp getLogintime() {
        return logintime;
    }

    public void setLogintime(Timestamp logintime) {
        this.logintime = logintime;
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", couriername='" + couriername + '\'' +
                ", staffphone='" + staffphone + '\'' +
                ", personalid='" + personalid + '\'' +
                ", password='" + password + '\'' +
                ", delivery=" + delivery +
                ", createtime=" + createtime +
                ", logintime=" + logintime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id && delivery == courier.delivery && Objects.equals(couriername, courier.couriername) && Objects.equals(staffphone, courier.staffphone) && Objects.equals(personalid, courier.personalid) && Objects.equals(password, courier.password) && Objects.equals(createtime, courier.createtime) && Objects.equals(logintime, courier.logintime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, couriername, staffphone, personalid, password, delivery, createtime, logintime);
    }

}
